export function getDomainName() {
  //各种环境域名
  let box = {
    baseUrl: ''
  };
  const protocol = window.location.protocol;
  const hostname = window.location.hostname;
  const host = window.location.host;
  if (hostname == 'localhost') {  //开发环境
    box.baseUrl = '/api/web';
  } else {
    box.baseUrl = protocol + '//' + host + '/api/web';
  }

  return box;
}

